home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue47 / Clinic / ActiveX / SHDocVw_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-01-14  |  59.9 KB  |  1,441 lines

  1. unit SHDocVw_TLB;
  2.  
  3. { This file contains pascal declarations imported from a type library.
  4.   This file will be written during each import or refresh of the type
  5.   library editor.  Changes to this file will be discarded during the
  6.   refresh process. }
  7.  
  8. { Microsoft Internet Controls }
  9. { Version 1.1 }
  10.  
  11. { Conversion log:
  12.   Warning: 'Type' is a reserved word. IWebBrowser.Type changed to Type_
  13.   Warning: 'Property' is a reserved word. Parameter 'Property' in DWebBrowserEvents.PropertyChange changed to 'Property_'
  14.   Warning: 'Property' is a reserved word. Parameter 'Property' in IWebBrowserApp.PutProperty changed to 'Property_'
  15.   Warning: 'Property' is a reserved word. Parameter 'Property' in IWebBrowserApp.GetProperty changed to 'Property_'
  16.   Warning: 'Type' is a reserved word. FolderItem.Type changed to Type_
  17.   Warning: 'Type' is a reserved word. Parameter 'Type' in IShellUIHelper.AddDesktopComponent changed to 'Type_'
  18.  }
  19.  
  20. interface
  21.  
  22. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  23.  
  24. const
  25.   LIBID_SHDocVw: TGUID = '{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}';
  26.  
  27. const
  28.  
  29. { Constants for WebBrowser CommandStateChange }
  30.  
  31. { CommandStateChangeConstants }
  32.  
  33.   CSC_UPDATECOMMANDS = -1;
  34.   CSC_NAVIGATEFORWARD = 1;
  35.   CSC_NAVIGATEBACK = 2;
  36.  
  37. { OLECMDID }
  38.  
  39.   OLECMDID_OPEN = 1;
  40.   OLECMDID_NEW = 2;
  41.   OLECMDID_SAVE = 3;
  42.   OLECMDID_SAVEAS = 4;
  43.   OLECMDID_SAVECOPYAS = 5;
  44.   OLECMDID_PRINT = 6;
  45.   OLECMDID_PRINTPREVIEW = 7;
  46.   OLECMDID_PAGESETUP = 8;
  47.   OLECMDID_SPELL = 9;
  48.   OLECMDID_PROPERTIES = 10;
  49.   OLECMDID_CUT = 11;
  50.   OLECMDID_COPY = 12;
  51.   OLECMDID_PASTE = 13;
  52.   OLECMDID_PASTESPECIAL = 14;
  53.   OLECMDID_UNDO = 15;
  54.   OLECMDID_REDO = 16;
  55.   OLECMDID_SELECTALL = 17;
  56.   OLECMDID_CLEARSELECTION = 18;
  57.   OLECMDID_ZOOM = 19;
  58.   OLECMDID_GETZOOMRANGE = 20;
  59.   OLECMDID_UPDATECOMMANDS = 21;
  60.   OLECMDID_REFRESH = 22;
  61.   OLECMDID_STOP = 23;
  62.   OLECMDID_HIDETOOLBARS = 24;
  63.   OLECMDID_SETPROGRESSMAX = 25;
  64.   OLECMDID_SETPROGRESSPOS = 26;
  65.   OLECMDID_SETPROGRESSTEXT = 27;
  66.   OLECMDID_SETTITLE = 28;
  67.   OLECMDID_SETDOWNLOADSTATE = 29;
  68.   OLECMDID_STOPDOWNLOAD = 30;
  69.   OLECMDID_ONTOOLBARACTIVATED = 31;
  70.   OLECMDID_FIND = 32;
  71.   OLECMDID_DELETE = 33;
  72.   OLECMDID_HTTPEQUIV = 34;
  73.   OLECMDID_HTTPEQUIV_DONE = 35;
  74.   OLECMDID_ENABLE_INTERACTION = 36;
  75.   OLECMDID_ONUNLOAD = 37;
  76.   OLECMDID_PROPERTYBAG2 = 38;
  77.   OLECMDID_PREREFRESH = 39;
  78.  
  79. { OLECMDF }
  80.  
  81.   OLECMDF_SUPPORTED = 1;
  82.   OLECMDF_ENABLED = 2;
  83.   OLECMDF_LATCHED = 4;
  84.   OLECMDF_NINCHED = 8;
  85.  
  86. { OLECMDEXECOPT }
  87.  
  88.   OLECMDEXECOPT_DODEFAULT = 0;
  89.   OLECMDEXECOPT_PROMPTUSER = 1;
  90.   OLECMDEXECOPT_DONTPROMPTUSER = 2;
  91.   OLECMDEXECOPT_SHOWHELP = 3;
  92.  
  93. { tagREADYSTATE }
  94.  
  95.   READYSTATE_UNINITIALIZED = 0;
  96.   READYSTATE_LOADING = 1;
  97.   READYSTATE_LOADED = 2;
  98.   READYSTATE_INTERACTIVE = 3;
  99.   READYSTATE_COMPLETE = 4;
  100.  
  101. { Constants for ShellWindows registration }
  102.  
  103. { ShellWindowTypeConstants }
  104.  
  105.   SWC_EXPLORER = 0;
  106.   SWC_BROWSER = 1;
  107.   SWC_3RDPARTY = 2;
  108.   SWC_CALLBACK = 4;
  109.  
  110. { Options for ShellWindows FindWindow }
  111.  
  112. { ShellWindowFindWindowOptions }
  113.  
  114.   SWFO_NEEDDISPATCH = 1;
  115.   SWFO_INCLUDEPENDING = 2;
  116.   SWFO_COOKIEPASSED = 4;
  117.  
  118. { Constants for ViewOptions }
  119.  
  120. { ShellFolderViewOptions }
  121.  
  122.   SFVVO_SHOWALLOBJECTS = 1;
  123.   SFVVO_SHOWEXTENSIONS = 2;
  124.   SFVVO_SHOWCOMPCOLOR = 8;
  125.   SFVVO_SHOWSYSFILES = 32;
  126.   SFVVO_WIN95CLASSIC = 64;
  127.   SFVVO_DOUBLECLICKINWEBVIEW = 128;
  128.   SFVVO_DESKTOPHTML = 512;
  129.  
  130. { Constants for Special Folders for open/Explore }
  131.  
  132. { ShellSpecialFolderConstants }
  133.  
  134.   ssfDESKTOP = 0;
  135.   ssfPROGRAMS = 2;
  136.   ssfCONTROLS = 3;
  137.   ssfPRINTERS = 4;
  138.   ssfPERSONAL = 5;
  139.   ssfFAVORITES = 6;
  140.   ssfSTARTUP = 7;
  141.   ssfRECENT = 8;
  142.   ssfSENDTO = 9;
  143.   ssfBITBUCKET = 10;
  144.   ssfSTARTMENU = 11;
  145.   ssfDESKTOPDIRECTORY = 16;
  146.   ssfDRIVES = 17;
  147.   ssfNETWORK = 18;
  148.   ssfNETHOOD = 19;
  149.   ssfFONTS = 20;
  150.   ssfTEMPLATES = 21;
  151.  
  152. const
  153.  
  154. { Component class GUIDs }
  155.   Class_WebBrowser_V1: TGUID = '{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B}';
  156.   Class_WebBrowser: TGUID = '{8856F961-340A-11D0-A96B-00C04FD705A2}';
  157.   Class_InternetExplorer: TGUID = '{0002DF01-0000-0000-C000-000000000046}';
  158.   Class_ShellFolderViewOC: TGUID = '{9BA05971-F6A8-11CF-A442-00A0C90A8F39}';
  159.   Class_ShellWindows: TGUID = '{9BA05972-F6A8-11CF-A442-00A0C90A8F39}';
  160.   Class_ShellLinkObject: TGUID = '{11219420-1768-11D1-95BE-00609797EA4F}';
  161.   Class_ShellFolderView: TGUID = '{62112AA1-EBE4-11CF-A5FB-0020AFE7292D}';
  162.   Class_Shell: TGUID = '{13709620-C279-11CE-A49E-444553540000}';
  163.   Class_ShellDispatchInproc: TGUID = '{0A89A860-D7B1-11CE-8350-444553540000}';
  164.   Class_WebViewFolderContents: TGUID = '{1820FED0-473E-11D0-A96C-00C04FD705A2}';
  165.   Class_ShellUIHelper: TGUID = '{64AB4BB7-111E-11D1-8F79-00C04FC2FBE1}';
  166.  
  167. type
  168.  
  169. { Forward declarations: Interfaces }
  170.   IWebBrowser = interface;
  171.   IWebBrowserDisp = dispinterface;
  172.   DWebBrowserEvents = dispinterface;
  173.   IWebBrowserApp = interface;
  174.   IWebBrowserAppDisp = dispinterface;
  175.   IWebBrowser2 = interface;
  176.   IWebBrowser2Disp = dispinterface;
  177.   DWebBrowserEvents2 = dispinterface;
  178.   IFolderViewOC = interface;
  179.   IFolderViewOCDisp = dispinterface;
  180.   DShellFolderViewEvents = dispinterface;
  181.   DShellWindowsEvents = dispinterface;
  182.   IShellWindows = interface;
  183.   IShellWindowsDisp = dispinterface;
  184.   IShellLinkDual = interface;
  185.   IShellLinkDualDisp = dispinterface;
  186.   FolderItemVerb = interface;
  187.   FolderItemVerbDisp = dispinterface;
  188.   FolderItemVerbs = interface;
  189.   FolderItemVerbsDisp = dispinterface;
  190.   Folder = interface;
  191.   FolderDisp = dispinterface;
  192.   FolderItems = interface;
  193.   FolderItemsDisp = dispinterface;
  194.   FolderItem = interface;
  195.   FolderItemDisp = dispinterface;
  196.   IShellFolderViewDual = interface;
  197.   IShellFolderViewDualDisp = dispinterface;
  198.   IShellDispatch = interface;
  199.   IShellDispatchDisp = dispinterface;
  200.   IShellUIHelper = interface;
  201.   IShellUIHelperDisp = dispinterface;
  202.  
  203. { Forward declarations: CoClasses }
  204.   WebBrowser_V1 = IWebBrowser;
  205.   WebBrowser = IWebBrowser2;
  206.   InternetExplorer = IWebBrowser2;
  207.   ShellFolderViewOC = IFolderViewOC;
  208.   ShellWindows = IShellWindows;
  209.   ShellLinkObject = IShellLinkDual;
  210.   ShellFolderView = IShellFolderViewDual;
  211.   Shell = IShellDispatch;
  212.   ShellDispatchInproc = IUnknown;
  213.   WebViewFolderContents = IShellFolderViewDual;
  214.   ShellUIHelper = IShellUIHelper;
  215.  
  216. { Forward declarations: Enums }
  217.   CommandStateChangeConstants = TOleEnum;
  218.   OLECMDID = TOleEnum;
  219.   OLECMDF = TOleEnum;
  220.   OLECMDEXECOPT = TOleEnum;
  221.   tagREADYSTATE = TOleEnum;
  222.   ShellWindowTypeConstants = TOleEnum;
  223.   ShellWindowFindWindowOptions = TOleEnum;
  224.   ShellFolderViewOptions = TOleEnum;
  225.   ShellSpecialFolderConstants = TOleEnum;
  226.  
  227. { Web Browser interface }
  228.  
  229.   IWebBrowser = interface(IDispatch)
  230.     ['{EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B}']
  231.     procedure GoBack; safecall;
  232.     procedure GoForward; safecall;
  233.     procedure GoHome; safecall;
  234.     procedure GoSearch; safecall;
  235.     procedure Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant); safecall;
  236.     procedure Refresh; safecall;
  237.     procedure Refresh2(var Level: OleVariant); safecall;
  238.     procedure Stop; safecall;
  239.     function Get_Application: IDispatch; safecall;
  240.     function Get_Parent: IDispatch; safecall;
  241.     function Get_Container: IDispatch; safecall;
  242.     function Get_Document: IDispatch; safecall;
  243.     function Get_TopLevelContainer: WordBool; safecall;
  244.     function Get_Type_: WideString; safecall;
  245.     function Get_Left: Integer; safecall;
  246.     procedure Set_Left(Value: Integer); safecall;
  247.     function Get_Top: Integer; safecall;
  248.     procedure Set_Top(Value: Integer); safecall;
  249.     function Get_Width: Integer; safecall;
  250.     procedure Set_Width(Value: Integer); safecall;
  251.     function Get_Height: Integer; safecall;
  252.     procedure Set_Height(Value: Integer); safecall;
  253.     function Get_LocationName: WideString; safecall;
  254.     function Get_LocationURL: WideString; safecall;
  255.     function Get_Busy: WordBool; safecall;
  256.     property Application: IDispatch read Get_Application;
  257.     property Parent: IDispatch read Get_Parent;
  258.     property Container: IDispatch read Get_Container;
  259.     property Document: IDispatch read Get_Document;
  260.     property TopLevelContainer: WordBool read Get_TopLevelContainer;
  261.     property Type_: WideString read Get_Type_;
  262.     property Left: Integer read Get_Left write Set_Left;
  263.     property Top: Integer read Get_Top write Set_Top;
  264.     property Width: Integer read Get_Width write Set_Width;
  265.     property Height: Integer read Get_Height write Set_Height;
  266.     property LocationName: WideString read Get_LocationName;
  267.     property LocationURL: WideString read Get_LocationURL;
  268.     property Busy: WordBool read Get_Busy;
  269.   end;
  270.  
  271. { DispInterface declaration for Dual Interface IWebBrowser }
  272.  
  273.   IWebBrowserDisp = dispinterface
  274.     ['{EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B}']
  275.     procedure GoBack; dispid 100;
  276.     procedure GoForward; dispid 101;
  277.     procedure GoHome; dispid 102;
  278.     procedure GoSearch; dispid 103;
  279.     procedure Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant); dispid 104;
  280.     procedure Refresh; dispid -550;
  281.     procedure Refresh2(var Level: OleVariant); dispid 105;
  282.     procedure Stop; dispid 106;
  283.     property Application: IDispatch readonly dispid 200;
  284.     property Parent: IDispatch readonly dispid 201;
  285.     property Container: IDispatch readonly dispid 202;
  286.     property Document: IDispatch readonly dispid 203;
  287.     property TopLevelContainer: WordBool readonly dispid 204;
  288.     property Type_: WideString readonly dispid 205;
  289.     property Left: Integer dispid 206;
  290.     property Top: Integer dispid 207;
  291.     property Width: Integer dispid 208;
  292.     property Height: Integer dispid 209;
  293.     property LocationName: WideString readonly dispid 210;
  294.     property LocationURL: WideString readonly dispid 211;
  295.     property Busy: WordBool readonly dispid 212;
  296.   end;
  297.  
  298. { Web Browser Control Events (old) }
  299.  
  300.   DWebBrowserEvents = dispinterface
  301.     ['{EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B}']
  302.     procedure BeforeNavigate(const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Cancel: WordBool); dispid 100;
  303.     procedure NavigateComplete(const URL: WideString); dispid 101;
  304.     procedure StatusTextChange(const Text: WideString); dispid 102;
  305.     procedure ProgressChange(Progress, ProgressMax: Integer); dispid 108;
  306.     procedure DownloadComplete; dispid 104;
  307.     procedure CommandStateChange(Command: Integer; Enable: WordBool); dispid 105;
  308.     procedure DownloadBegin; dispid 106;
  309.     procedure NewWindow(const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Processed: WordBool); dispid 107;
  310.     procedure TitleChange(const Text: WideString); dispid 113;
  311.     procedure FrameBeforeNavigate(const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Cancel: WordBool); dispid 200;
  312.     procedure FrameNavigateComplete(const URL: WideString); dispid 201;
  313.     procedure FrameNewWindow(const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Processed: WordBool); dispid 204;
  314.     procedure Quit(var Cancel: WordBool); dispid 103;
  315.     procedure WindowMove; dispid 109;
  316.     procedure WindowResize; dispid 110;
  317.     procedure WindowActivate; dispid 111;
  318.     procedure PropertyChange(const Property_: WideString); dispid 112;
  319.   end;
  320.  
  321. { Web Browser Application Interface. }
  322.  
  323.   IWebBrowserApp = interface(IWebBrowser)
  324.     ['{0002DF05-0000-0000-C000-000000000046}']
  325.     procedure Quit; safecall;
  326.     procedure ClientToWindow(var pcx, pcy: SYSINT); safecall;
  327.     procedure PutProperty(const Property_: WideString; vtValue: OleVariant); safecall;
  328.     function GetProperty(const Property_: WideString): OleVariant; safecall;
  329.     function Get_Name: WideString; safecall;
  330.     function Get_HWND: Integer; safecall;
  331.     function Get_FullName: WideString; safecall;
  332.     function Get_Path: WideString; safecall;
  333.     function Get_Visible: WordBool; safecall;
  334.     procedure Set_Visible(Value: WordBool); safecall;
  335.     function Get_StatusBar: WordBool; safecall;
  336.     procedure Set_StatusBar(Value: WordBool); safecall;
  337.     function Get_StatusText: WideString; safecall;
  338.     procedure Set_StatusText(const Value: WideString); safecall;
  339.     function Get_ToolBar: SYSINT; safecall;
  340.     procedure Set_ToolBar(Value: SYSINT); safecall;
  341.     function Get_MenuBar: WordBool; safecall;
  342.     procedure Set_MenuBar(Value: WordBool); safecall;
  343.     function Get_FullScreen: WordBool; safecall;
  344.     procedure Set_FullScreen(Value: WordBool); safecall;
  345.     property Name: WideString read Get_Name;
  346.     property HWND: Integer read Get_HWND;
  347.     property FullName: WideString read Get_FullName;
  348.     property Path: WideString read Get_Path;
  349.     property Visible: WordBool read Get_Visible write Set_Visible;
  350.     property StatusBar: WordBool read Get_StatusBar write Set_StatusBar;
  351.     property StatusText: WideString read Get_StatusText write Set_StatusText;
  352.     property ToolBar: SYSINT read Get_ToolBar write Set_ToolBar;
  353.     property MenuBar: WordBool read Get_MenuBar write Set_MenuBar;
  354.     property FullScreen: WordBool read Get_FullScreen write Set_FullScreen;
  355.   end;
  356.  
  357. { DispInterface declaration for Dual Interface IWebBrowserApp }
  358.  
  359.   IWebBrowserAppDisp = dispinterface
  360.     ['{0002DF05-0000-0000-C000-000000000046}']
  361.     procedure GoBack; dispid 100;
  362.     procedure GoForward; dispid 101;
  363.     procedure GoHome; dispid 102;
  364.     procedure GoSearch; dispid 103;
  365.     procedure Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant); dispid 104;
  366.     procedure Refresh; dispid -550;
  367.     procedure Refresh2(var Level: OleVariant); dispid 105;
  368.     procedure Stop; dispid 106;
  369.     property Application: IDispatch readonly dispid 200;
  370.     property Parent: IDispatch readonly dispid 201;
  371.     property Container: IDispatch readonly dispid 202;
  372.     property Document: IDispatch readonly dispid 203;
  373.     property TopLevelContainer: WordBool readonly dispid 204;
  374.     property Type_: WideString readonly dispid 205;
  375.     property Left: Integer dispid 206;
  376.     property Top: Integer dispid 207;
  377.     property Width: Integer dispid 208;
  378.     property Height: Integer dispid 209;
  379.     property LocationName: WideString readonly dispid 210;
  380.     property LocationURL: WideString readonly dispid 211;
  381.     property Busy: WordBool readonly dispid 212;
  382.     procedure Quit; dispid 300;
  383.     procedure ClientToWindow(var pcx, pcy: SYSINT); dispid 301;
  384.     procedure PutProperty(const Property_: WideString; vtValue: OleVariant); dispid 302;
  385.     function GetProperty(const Property_: WideString): OleVariant; dispid 303;
  386.     property Name: WideString readonly dispid 0;
  387.     property HWND: Integer readonly dispid -515;
  388.     property FullName: WideString readonly dispid 400;
  389.     property Path: WideString readonly dispid 401;
  390.     property Visible: WordBool dispid 402;
  391.     property StatusBar: WordBool dispid 403;
  392.     property StatusText: WideString dispid 404;
  393.     property ToolBar: SYSINT dispid 405;
  394.     property MenuBar: WordBool dispid 406;
  395.     property FullScreen: WordBool dispid 407;
  396.   end;
  397.  
  398. { Web Browser Interface for IE4. }
  399.  
  400.   IWebBrowser2 = interface(IWebBrowserApp)
  401.     ['{D30C1661-CDAF-11D0-8A3E-00C04FC9E26E}']
  402.     procedure Navigate2(var URL, Flags, TargetFrameName, PostData, Headers: OleVariant); safecall;
  403.     function QueryStatusWB(cmdID: OLECMDID): OLECMDF; safecall;
  404.     procedure ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn, pvaOut: OleVariant); safecall;
  405.     procedure ShowBrowserBar(var pvaClsid, pvarShow, pvarSize: OleVariant); safecall;
  406.     function Get_ReadyState: tagREADYSTATE; safecall;
  407.     function Get_Offline: WordBool; safecall;
  408.     procedure Set_Offline(Value: WordBool); safecall;
  409.     function Get_Silent: WordBool; safecall;
  410.     procedure Set_Silent(Value: WordBool); safecall;
  411.     function Get_RegisterAsBrowser: WordBool; safecall;
  412.     procedure Set_RegisterAsBrowser(Value: WordBool); safecall;
  413.     function Get_RegisterAsDropTarget: WordBool; safecall;
  414.     procedure Set_RegisterAsDropTarget(Value: WordBool); safecall;
  415.     function Get_TheaterMode: WordBool; safecall;
  416.     procedure Set_TheaterMode(Value: WordBool); safecall;
  417.     function Get_AddressBar: WordBool; safecall;
  418.     procedure Set_AddressBar(Value: WordBool); safecall;
  419.     function Get_Resizable: WordBool; safecall;
  420.     procedure Set_Resizable(Value: WordBool); safecall;
  421.     property ReadyState: tagREADYSTATE read Get_ReadyState;
  422.     property Offline: WordBool read Get_Offline write Set_Offline;
  423.     property Silent: WordBool read Get_Silent write Set_Silent;
  424.     property RegisterAsBrowser: WordBool read Get_RegisterAsBrowser write Set_RegisterAsBrowser;
  425.     property RegisterAsDropTarget: WordBool read Get_RegisterAsDropTarget write Set_RegisterAsDropTarget;
  426.     property TheaterMode: WordBool read Get_TheaterMode write Set_TheaterMode;
  427.     property AddressBar: WordBool read Get_AddressBar write Set_AddressBar;
  428.     property Resizable: WordBool read Get_Resizable write Set_Resizable;
  429.   end;
  430.  
  431. { DispInterface declaration for Dual Interface IWebBrowser2 }
  432.  
  433.   IWebBrowser2Disp = dispinterface
  434.     ['{D30C1661-CDAF-11D0-8A3E-00C04FC9E26E}']
  435.     procedure GoBack; dispid 100;
  436.     procedure GoForward; dispid 101;
  437.     procedure GoHome; dispid 102;
  438.     procedure GoSearch; dispid 103;
  439.     procedure Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant); dispid 104;
  440.     procedure Refresh; dispid -550;
  441.     procedure Refresh2(var Level: OleVariant); dispid 105;
  442.     procedure Stop; dispid 106;
  443.     property Application: IDispatch readonly dispid 200;
  444.     property Parent: IDispatch readonly dispid 201;
  445.     property Container: IDispatch readonly dispid 202;
  446.     property Document: IDispatch readonly dispid 203;
  447.     property TopLevelContainer: WordBool readonly dispid 204;
  448.     property Type_: WideString readonly dispid 205;
  449.     property Left: Integer dispid 206;
  450.     property Top: Integer dispid 207;
  451.     property Width: Integer dispid 208;
  452.     property Height: Integer dispid 209;
  453.     property LocationName: WideString readonly dispid 210;
  454.     property LocationURL: WideString readonly dispid 211;
  455.     property Busy: WordBool readonly dispid 212;
  456.     procedure Quit; dispid 300;
  457.     procedure ClientToWindow(var pcx, pcy: SYSINT); dispid 301;
  458.     procedure PutProperty(const Property_: WideString; vtValue: OleVariant); dispid 302;
  459.     function GetProperty(const Property_: WideString): OleVariant; dispid 303;
  460.     property Name: WideString readonly dispid 0;
  461.     property HWND: Integer readonly dispid -515;
  462.     property FullName: WideString readonly dispid 400;
  463.     property Path: WideString readonly dispid 401;
  464.     property Visible: WordBool dispid 402;
  465.     property StatusBar: WordBool dispid 403;
  466.     property StatusText: WideString dispid 404;
  467.     property ToolBar: SYSINT dispid 405;
  468.     property MenuBar: WordBool dispid 406;
  469.     property FullScreen: WordBool dispid 407;
  470.     procedure Navigate2(var URL, Flags, TargetFrameName, PostData, Headers: OleVariant); dispid 500;
  471.     function QueryStatusWB(cmdID: OLECMDID): OLECMDF; dispid 501;
  472.     procedure ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn, pvaOut: OleVariant); dispid 502;
  473.     procedure ShowBrowserBar(var pvaClsid, pvarShow, pvarSize: OleVariant); dispid 503;
  474.     property ReadyState: tagREADYSTATE readonly dispid -525;
  475.     property Offline: WordBool dispid 550;
  476.     property Silent: WordBool dispid 551;
  477.     property RegisterAsBrowser: WordBool dispid 552;
  478.     property RegisterAsDropTarget: WordBool dispid 553;
  479.     property TheaterMode: WordBool dispid 554;
  480.     property AddressBar: WordBool dispid 555;
  481.     property Resizable: WordBool dispid 556;
  482.   end;
  483.  
  484. { Web Browser Control events interface }
  485.  
  486.   DWebBrowserEvents2 = dispinterface
  487.     ['{34A715A0-6587-11D0-924A-0020AFC7AC4D}']
  488.     procedure StatusTextChange(const Text: WideString); dispid 102;
  489.     procedure ProgressChange(Progress, ProgressMax: Integer); dispid 108;
  490.     procedure CommandStateChange(Command: Integer; Enable: WordBool); dispid 105;
  491.     procedure DownloadBegin; dispid 106;
  492.     procedure DownloadComplete; dispid 104;
  493.     procedure TitleChange(const Text: WideString); dispid 113;
  494.     procedure PropertyChange(const szProperty: WideString); dispid 112;
  495.     procedure BeforeNavigate2(pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData, Headers: OleVariant; var Cancel: WordBool); dispid 250;
  496.     procedure NewWindow2(var ppDisp: IDispatch; var Cancel: WordBool); dispid 251;
  497.     procedure NavigateComplete2(pDisp: IDispatch; var URL: OleVariant); dispid 252;
  498.     procedure DocumentComplete(pDisp: IDispatch; var URL: OleVariant); dispid 259;
  499.     procedure OnQuit; dispid 253;
  500.     procedure OnVisible(Visible: WordBool); dispid 254;
  501.     procedure OnToolBar(ToolBar: WordBool); dispid 255;
  502.     procedure OnMenuBar(MenuBar: WordBool); dispid 256;
  503.     procedure OnStatusBar(StatusBar: WordBool); dispid 257;
  504.     procedure OnFullScreen(FullScreen: WordBool); dispid 258;
  505.     procedure OnTheaterMode(TheaterMode: WordBool); dispid 260;
  506.   end;
  507.  
  508. { Folder View Events Forwarder Object }
  509.  
  510.   IFolderViewOC = interface(IDispatch)
  511.     ['{9BA05970-F6A8-11CF-A442-00A0C90A8F39}']
  512.     procedure SetFolderView(pDisp: IDispatch); safecall;
  513.   end;
  514.  
  515. { DispInterface declaration for Dual Interface IFolderViewOC }
  516.  
  517.   IFolderViewOCDisp = dispinterface
  518.     ['{9BA05970-F6A8-11CF-A442-00A0C90A8F39}']
  519.     procedure SetFolderView(pDisp: IDispatch); dispid 1610743808;
  520.   end;
  521.  
  522. { Event interface for ShellFolderView }
  523.  
  524.   DShellFolderViewEvents = dispinterface
  525.     ['{62112AA2-EBE4-11CF-A5FB-0020AFE7292D}']
  526.     procedure SelectionChanged; dispid 200;
  527.   end;
  528.  
  529. { Event interface for IShellWindows }
  530.  
  531.   DShellWindowsEvents = dispinterface
  532.     ['{FE4106E0-399A-11D0-A48C-00A0C90A8F39}']
  533.     procedure WindowRegistered(lCookie: Integer); dispid 200;
  534.     procedure WindowRevoked(lCookie: Integer); dispid 201;
  535.   end;
  536.  
  537. { Definition of interface IShellWindows }
  538.  
  539.   IShellWindows = interface(IDispatch)
  540.     ['{85CB6900-4D95-11CF-960C-0080C7F4EE85}']
  541.     function Get_Count: Integer; safecall;
  542.     function Item(index: OleVariant): IDispatch; safecall;
  543.     function _NewEnum: IUnknown; safecall;
  544.     procedure Register(pid: IDispatch; HWND: Integer; swClass: SYSINT; out plCookie: Integer); safecall;
  545.     procedure RegisterPending(lThreadId: Integer; var pvarloc, pvarlocRoot: OleVariant; swClass: SYSINT; out plCookie: Integer); safecall;
  546.     procedure Revoke(lCookie: Integer); safecall;
  547.     procedure OnNavigate(lCookie: Integer; var pvarloc: OleVariant); safecall;
  548.     procedure OnActivated(lCookie: Integer; fActive: WordBool); safecall;
  549.     function FindWindow(var pvarloc, pvarlocRoot: OleVariant; swClass: SYSINT; out pHWND: Integer; swfwOptions: SYSINT): IDispatch; safecall;
  550.     procedure OnCreated(lCookie: Integer; punk: IUnknown); safecall;
  551.     procedure ProcessAttachDetach(fAttach: WordBool); safecall;
  552.     property Count: Integer read Get_Count;
  553.   end;
  554.  
  555. { DispInterface declaration for Dual Interface IShellWindows }
  556.  
  557.   IShellWindowsDisp = dispinterface
  558.     ['{85CB6900-4D95-11CF-960C-0080C7F4EE85}']
  559.     property Count: Integer readonly dispid 1610743808;
  560.     function Item(index: OleVariant): IDispatch; dispid 0;
  561.     function _NewEnum: IUnknown; dispid -4;
  562.     procedure Register(pid: IDispatch; HWND: Integer; swClass: SYSINT; out plCookie: Integer); dispid 1610743811;
  563.     procedure RegisterPending(lThreadId: Integer; var pvarloc, pvarlocRoot: OleVariant; swClass: SYSINT; out plCookie: Integer); dispid 1610743812;
  564.     procedure Revoke(lCookie: Integer); dispid 1610743813;
  565.     procedure OnNavigate(lCookie: Integer; var pvarloc: OleVariant); dispid 1610743814;
  566.     procedure OnActivated(lCookie: Integer; fActive: WordBool); dispid 1610743815;
  567.     function FindWindow(var pvarloc, pvarlocRoot: OleVariant; swClass: SYSINT; out pHWND: Integer; swfwOptions: SYSINT): IDispatch; dispid 1610743816;
  568.     procedure OnCreated(lCookie: Integer; punk: IUnknown); dispid 1610743817;
  569.     procedure ProcessAttachDetach(fAttach: WordBool); dispid 1610743818;
  570.   end;
  571.  
  572. { Definition of Shell Link IDispatch interface }
  573.  
  574.   IShellLinkDual = interface(IDispatch)
  575.     ['{88A05C00-F000-11CE-8350-444553540000}']
  576.     function Get_Path: WideString; safecall;
  577.     procedure Set_Path(const Value: WideString); safecall;
  578.     function Get_Description: WideString; safecall;
  579.     procedure Set_Description(const Value: WideString); safecall;
  580.     function Get_WorkingDirectory: WideString; safecall;
  581.     procedure Set_WorkingDirectory(const Value: WideString); safecall;
  582.     function Get_Arguments: WideString; safecall;
  583.     procedure Set_Arguments(const Value: WideString); safecall;
  584.     function Get_Hotkey: SYSINT; safecall;
  585.     procedure Set_Hotkey(Value: SYSINT); safecall;
  586.     function Get_ShowCommand: SYSINT; safecall;
  587.     procedure Set_ShowCommand(Value: SYSINT); safecall;
  588.     procedure Resolve(fFlags: SYSINT); safecall;
  589.     function GetIconLocation(out pbs: WideString): SYSINT; safecall;
  590.     procedure SetIconLocation(const bs: WideString; iIcon: SYSINT); safecall;
  591.     procedure Save(vWhere: OleVariant); safecall;
  592.     property Path: WideString read Get_Path write Set_Path;
  593.     property Description: WideString read Get_Description write Set_Description;
  594.     property WorkingDirectory: WideString read Get_WorkingDirectory write Set_WorkingDirectory;
  595.     property Arguments: WideString read Get_Arguments write Set_Arguments;
  596.     property Hotkey: SYSINT read Get_Hotkey write Set_Hotkey;
  597.     property ShowCommand: SYSINT read Get_ShowCommand write Set_ShowCommand;
  598.   end;
  599.  
  600. { DispInterface declaration for Dual Interface IShellLinkDual }
  601.  
  602.   IShellLinkDualDisp = dispinterface
  603.     ['{88A05C00-F000-11CE-8350-444553540000}']
  604.     property Path: WideString dispid 1610743808;
  605.     property Description: WideString dispid 1610743810;
  606.     property WorkingDirectory: WideString dispid 1610743812;
  607.     property Arguments: WideString dispid 1610743814;
  608.     property Hotkey: SYSINT dispid 1610743816;
  609.     property ShowCommand: SYSINT dispid 1610743818;
  610.     procedure Resolve(fFlags: SYSINT); dispid 1610743820;
  611.     function GetIconLocation(out pbs: WideString): SYSINT; dispid 1610743821;
  612.     procedure SetIconLocation(const bs: WideString; iIcon: SYSINT); dispid 1610743822;
  613.     procedure Save(vWhere: OleVariant); dispid 1610743823;
  614.   end;
  615.  
  616. { Definition of interface FolderItemVerb }
  617.  
  618.   FolderItemVerb = interface(IDispatch)
  619.     ['{08EC3E00-50B0-11CF-960C-0080C7F4EE85}']
  620.     function Get_Application: IDispatch; safecall;
  621.     function Get_Parent: IDispatch; safecall;
  622.     function Get_Name: WideString; safecall;
  623.     procedure DoIt; safecall;
  624.     property Application: IDispatch read Get_Application;
  625.     property Parent: IDispatch read Get_Parent;
  626.     property Name: WideString read Get_Name;
  627.   end;
  628.  
  629. { DispInterface declaration for Dual Interface FolderItemVerb }
  630.  
  631.   FolderItemVerbDisp = dispinterface
  632.     ['{08EC3E00-50B0-11CF-960C-0080C7F4EE85}']
  633.     property Application: IDispatch readonly dispid 1610743808;
  634.     property Parent: IDispatch readonly dispid 1610743809;
  635.     property Name: WideString readonly dispid 0;
  636.     procedure DoIt; dispid 1610743811;
  637.   end;
  638.  
  639. { Definition of interface FolderItemVerbs }
  640.  
  641.   FolderItemVerbs = interface(IDispatch)
  642.     ['{1F8352C0-50B0-11CF-960C-0080C7F4EE85}']
  643.     function Get_Count: Integer; safecall;
  644.     function Get_Application: IDispatch; safecall;
  645.     function Get_Parent: IDispatch; safecall;
  646.     function Item(index: OleVariant): FolderItemVerb; safecall;
  647.     function _NewEnum: IUnknown; safecall;
  648.     property Count: Integer read Get_Count;
  649.     property Application: IDispatch read Get_Application;
  650.     property Parent: IDispatch read Get_Parent;
  651.   end;
  652.  
  653. { DispInterface declaration for Dual Interface FolderItemVerbs }
  654.  
  655.   FolderItemVerbsDisp = dispinterface
  656.     ['{1F8352C0-50B0-11CF-960C-0080C7F4EE85}']
  657.     property Count: Integer readonly dispid 1610743808;
  658.     property Application: IDispatch readonly dispid 1610743809;
  659.     property Parent: IDispatch readonly dispid 1610743810;
  660.     function Item(index: OleVariant): FolderItemVerb; dispid 1610743811;
  661.     function _NewEnum: IUnknown; dispid -4;
  662.   end;
  663.  
  664. { Definition of interface Folder }
  665.  
  666.   Folder = interface(IDispatch)
  667.     ['{BBCBDE60-C3FF-11CE-8350-444553540000}']
  668.     function Get_Title: WideString; safecall;
  669.     function Get_Application: IDispatch; safecall;
  670.     function Get_Parent: IDispatch; safecall;
  671.     function Get_ParentFolder: Folder; safecall;
  672.     function Items: FolderItems; safecall;
  673.     function ParseName(const bName: WideString): FolderItem; safecall;
  674.     procedure NewFolder(const bName: WideString; vOptions: OleVariant); safecall;
  675.     procedure MoveHere(vItem, vOptions: OleVariant); safecall;
  676.     procedure CopyHere(vItem, vOptions: OleVariant); safecall;
  677.     function GetDetailsOf(vItem: OleVariant; iColumn: SYSINT): WideString; safecall;
  678.     property Title: WideString read Get_Title;
  679.     property Application: IDispatch read Get_Application;
  680.     property Parent: IDispatch read Get_Parent;
  681.     property ParentFolder: Folder read Get_ParentFolder;
  682.   end;
  683.  
  684. { DispInterface declaration for Dual Interface Folder }
  685.  
  686.   FolderDisp = dispinterface
  687.     ['{BBCBDE60-C3FF-11CE-8350-444553540000}']
  688.     property Title: WideString readonly dispid 0;
  689.     property Application: IDispatch readonly dispid 1610743809;
  690.     property Parent: IDispatch readonly dispid 1610743810;
  691.     property ParentFolder: Folder readonly dispid 1610743811;
  692.     function Items: FolderItems; dispid 1610743812;
  693.     function ParseName(const bName: WideString): FolderItem; dispid 1610743813;
  694.     procedure NewFolder(const bName: WideString; vOptions: OleVariant); dispid 1610743814;
  695.     procedure MoveHere(vItem, vOptions: OleVariant); dispid 1610743815;
  696.     procedure CopyHere(vItem, vOptions: OleVariant); dispid 1610743816;
  697.     function GetDetailsOf(vItem: OleVariant; iColumn: SYSINT): WideString; dispid 1610743817;
  698.   end;
  699.  
  700. { Definition of interface FolderItems }
  701.  
  702.   FolderItems = interface(IDispatch)
  703.     ['{744129E0-CBE5-11CE-8350-444553540000}']
  704.     function Get_Count: Integer; safecall;
  705.     function Get_Application: IDispatch; safecall;
  706.     function Get_Parent: IDispatch; safecall;
  707.     function Item(index: OleVariant): FolderItem; safecall;
  708.     function _NewEnum: IUnknown; safecall;
  709.     property Count: Integer read Get_Count;
  710.     property Application: IDispatch read Get_Application;
  711.     property Parent: IDispatch read Get_Parent;
  712.   end;
  713.  
  714. { DispInterface declaration for Dual Interface FolderItems }
  715.  
  716.   FolderItemsDisp = dispinterface
  717.     ['{744129E0-CBE5-11CE-8350-444553540000}']
  718.     property Count: Integer readonly dispid 1610743808;
  719.     property Application: IDispatch readonly dispid 1610743809;
  720.     property Parent: IDispatch readonly dispid 1610743810;
  721.     function Item(index: OleVariant): FolderItem; dispid 1610743811;
  722.     function _NewEnum: IUnknown; dispid -4;
  723.   end;
  724.  
  725. { Definition of interface FolderItem }
  726.  
  727.   FolderItem = interface(IDispatch)
  728.     ['{FAC32C80-CBE4-11CE-8350-444553540000}']
  729.     function Get_Application: IDispatch; safecall;
  730.     function Get_Parent: IDispatch; safecall;
  731.     function Get_Name: WideString; safecall;
  732.     procedure Set_Name(const Value: WideString); safecall;
  733.     function Get_Path: WideString; safecall;
  734.     function Get_GetLink: IDispatch; safecall;
  735.     function Get_GetFolder: IDispatch; safecall;
  736.     function Get_IsLink: WordBool; safecall;
  737.     function Get_IsFolder: WordBool; safecall;
  738.     function Get_IsFileSystem: WordBool; safecall;
  739.     function Get_IsBrowsable: WordBool; safecall;
  740.     function Get_ModifyDate: TDateTime; safecall;
  741.     procedure Set_ModifyDate(Value: TDateTime); safecall;
  742.     function Get_Size: Integer; safecall;
  743.     function Get_Type_: WideString; safecall;
  744.     function Verbs: FolderItemVerbs; safecall;
  745.     procedure InvokeVerb(vVerb: OleVariant); safecall;
  746.     property Application: IDispatch read Get_Application;
  747.     property Parent: IDispatch read Get_Parent;
  748.     property Name: WideString read Get_Name write Set_Name;
  749.     property Path: WideString read Get_Path;
  750.     property GetLink: IDispatch read Get_GetLink;
  751.     property GetFolder: IDispatch read Get_GetFolder;
  752.     property IsLink: WordBool read Get_IsLink;
  753.     property IsFolder: WordBool read Get_IsFolder;
  754.     property IsFileSystem: WordBool read Get_IsFileSystem;
  755.     property IsBrowsable: WordBool read Get_IsBrowsable;
  756.     property ModifyDate: TDateTime read Get_ModifyDate write Set_ModifyDate;
  757.     property Size: Integer read Get_Size;
  758.     property Type_: WideString read Get_Type_;
  759.   end;
  760.  
  761. { DispInterface declaration for Dual Interface FolderItem }
  762.  
  763.   FolderItemDisp = dispinterface
  764.     ['{FAC32C80-CBE4-11CE-8350-444553540000}']
  765.     property Application: IDispatch readonly dispid 1610743808;
  766.     property Parent: IDispatch readonly dispid 1610743809;
  767.     property Name: WideString dispid 0;
  768.     property Path: WideString readonly dispid 1610743812;
  769.     property GetLink: IDispatch readonly dispid 1610743813;
  770.     property GetFolder: IDispatch readonly dispid 1610743814;
  771.     property IsLink: WordBool readonly dispid 1610743815;
  772.     property IsFolder: WordBool readonly dispid 1610743816;
  773.     property IsFileSystem: WordBool readonly dispid 1610743817;
  774.     property IsBrowsable: WordBool readonly dispid 1610743818;
  775.     property ModifyDate: TDateTime dispid 1610743819;
  776.     property Size: Integer readonly dispid 1610743821;
  777.     property Type_: WideString readonly dispid 1610743822;
  778.     function Verbs: FolderItemVerbs; dispid 1610743823;
  779.     procedure InvokeVerb(vVerb: OleVariant); dispid 1610743824;
  780.   end;
  781.  
  782. { definition of interface IShellFolderViewDual }
  783.  
  784.   IShellFolderViewDual = interface(IDispatch)
  785.     ['{E7A1AF80-4D96-11CF-960C-0080C7F4EE85}']
  786.     function Get_Application: IDispatch; safecall;
  787.     function Get_Parent: IDispatch; safecall;
  788.     function Get_Folder: Folder; safecall;
  789.     function SelectedItems: FolderItems; safecall;
  790.     function Get_FocusedItem: FolderItem; safecall;
  791.     procedure SelectItem(var pvfi: OleVariant; dwFlags: SYSINT); safecall;
  792.     function PopupItemMenu(const pfi: FolderItem; vx, vy: OleVariant): WideString; safecall;
  793.     function Get_Script: IDispatch; safecall;
  794.     function Get_ViewOptions: Integer; safecall;
  795.     property Application: IDispatch read Get_Application;
  796.     property Parent: IDispatch read Get_Parent;
  797.     property Folder: Folder read Get_Folder;
  798.     property FocusedItem: FolderItem read Get_FocusedItem;
  799.     property Script: IDispatch read Get_Script;
  800.     property ViewOptions: Integer read Get_ViewOptions;
  801.   end;
  802.  
  803. { DispInterface declaration for Dual Interface IShellFolderViewDual }
  804.  
  805.   IShellFolderViewDualDisp = dispinterface
  806.     ['{E7A1AF80-4D96-11CF-960C-0080C7F4EE85}']
  807.     property Application: IDispatch readonly dispid 1610743808;
  808.     property Parent: IDispatch readonly dispid 1610743809;
  809.     property Folder: Folder readonly dispid 1610743810;
  810.     function SelectedItems: FolderItems; dispid 1610743811;
  811.     property FocusedItem: FolderItem readonly dispid 1610743812;
  812.     procedure SelectItem(var pvfi: OleVariant; dwFlags: SYSINT); dispid 1610743813;
  813.     function PopupItemMenu(const pfi: FolderItem; vx, vy: OleVariant): WideString; dispid 1610743814;
  814.     property Script: IDispatch readonly dispid 1610743815;
  815.     property ViewOptions: Integer readonly dispid 1610743816;
  816.   end;
  817.  
  818. { Definition of interface IShellDispatch }
  819.  
  820.   IShellDispatch = interface(IDispatch)
  821.     ['{D8F015C0-C278-11CE-A49E-444553540000}']
  822.     function Get_Application: IDispatch; safecall;
  823.     function Get_Parent: IDispatch; safecall;
  824.     function NameSpace(vDir: OleVariant): Folder; safecall;
  825.     function BrowseForFolder(HWND: Integer; const Title: WideString; Options: Integer; RootFolder: OleVariant): Folder; safecall;
  826.     function Windows: IDispatch; safecall;
  827.     procedure Open(vDir: OleVariant); safecall;
  828.     procedure Explore(vDir: OleVariant); safecall;
  829.     procedure MinimizeAll; safecall;
  830.     procedure UndoMinimizeALL; safecall;
  831.     procedure FileRun; safecall;
  832.     procedure CascadeWindows; safecall;
  833.     procedure TileVertically; safecall;
  834.     procedure TileHorizontally; safecall;
  835.     procedure ShutdownWindows; safecall;
  836.     procedure Suspend; safecall;
  837.     procedure EjectPC; safecall;
  838.     procedure SetTime; safecall;
  839.     procedure TrayProperties; safecall;
  840.     procedure Help; safecall;
  841.     procedure FindFiles; safecall;
  842.     procedure FindComputer; safecall;
  843.     procedure RefreshMenu; safecall;
  844.     procedure ControlPanelItem(const szDir: WideString); safecall;
  845.     property Application: IDispatch read Get_Application;
  846.     property Parent: IDispatch read Get_Parent;
  847.   end;
  848.  
  849. { DispInterface declaration for Dual Interface IShellDispatch }
  850.  
  851.   IShellDispatchDisp = dispinterface
  852.     ['{D8F015C0-C278-11CE-A49E-444553540000}']
  853.     property Application: IDispatch readonly dispid 1610743808;
  854.     property Parent: IDispatch readonly dispid 1610743809;
  855.     function NameSpace(vDir: OleVariant): Folder; dispid 1610743810;
  856.     function BrowseForFolder(HWND: Integer; const Title: WideString; Options: Integer; RootFolder: OleVariant): Folder; dispid 1610743811;
  857.     function Windows: IDispatch; dispid 1610743812;
  858.     procedure Open(vDir: OleVariant); dispid 1610743813;
  859.     procedure Explore(vDir: OleVariant); dispid 1610743814;
  860.     procedure MinimizeAll; dispid 1610743815;
  861.     procedure UndoMinimizeALL; dispid 1610743816;
  862.     procedure FileRun; dispid 1610743817;
  863.     procedure CascadeWindows; dispid 1610743818;
  864.     procedure TileVertically; dispid 1610743819;
  865.     procedure TileHorizontally; dispid 1610743820;
  866.     procedure ShutdownWindows; dispid 1610743821;
  867.     procedure Suspend; dispid 1610743822;
  868.     procedure EjectPC; dispid 1610743823;
  869.     procedure SetTime; dispid 1610743824;
  870.     procedure TrayProperties; dispid 1610743825;
  871.     procedure Help; dispid 1610743826;
  872.     procedure FindFiles; dispid 1610743827;
  873.     procedure FindComputer; dispid 1610743828;
  874.     procedure RefreshMenu; dispid 1610743829;
  875.     procedure ControlPanelItem(const szDir: WideString); dispid 1610743830;
  876.   end;
  877.  
  878. { Shell UI Helper Control Interface }
  879.  
  880.   IShellUIHelper = interface(IDispatch)
  881.     ['{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}']
  882.     procedure ResetFirstBootMode; safecall;
  883.     procedure ResetSafeMode; safecall;
  884.     procedure RefreshOfflineDesktop; safecall;
  885.     procedure AddFavorite(const URL: WideString; var Title: OleVariant); safecall;
  886.     procedure AddChannel(const URL: WideString); safecall;
  887.     procedure AddDesktopComponent(const URL, Type_: WideString; var Left, Top, Width, Height: OleVariant); safecall;
  888.     function IsSubscribed(const URL: WideString): WordBool; safecall;
  889.   end;
  890.  
  891. { DispInterface declaration for Dual Interface IShellUIHelper }
  892.  
  893.   IShellUIHelperDisp = dispinterface
  894.     ['{729FE2F8-1EA8-11D1-8F85-00C04FC2FBE1}']
  895.     procedure ResetFirstBootMode; dispid 1;
  896.     procedure ResetSafeMode; dispid 2;
  897.     procedure RefreshOfflineDesktop; dispid 3;
  898.     procedure AddFavorite(const URL: WideString; var Title: OleVariant); dispid 4;
  899.     procedure AddChannel(const URL: WideString); dispid 5;
  900.     procedure AddDesktopComponent(const URL, Type_: WideString; var Left, Top, Width, Height: OleVariant); dispid 6;
  901.     function IsSubscribed(const URL: WideString): WordBool; dispid 7;
  902.   end;
  903.  
  904. { WebBrowser Control }
  905.  
  906.   TWebBrowser_V1BeforeNavigate = procedure(Sender: TObject; const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Cancel: WordBool) of object;
  907.   TWebBrowser_V1NavigateComplete = procedure(Sender: TObject; const URL: WideString) of object;
  908.   TWebBrowser_V1StatusTextChange = procedure(Sender: TObject; const Text: WideString) of object;
  909.   TWebBrowser_V1ProgressChange = procedure(Sender: TObject; Progress, ProgressMax: Integer) of object;
  910.   TWebBrowser_V1CommandStateChange = procedure(Sender: TObject; Command: Integer; Enable: WordBool) of object;
  911.   TWebBrowser_V1NewWindow = procedure(Sender: TObject; const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Processed: WordBool) of object;
  912.   TWebBrowser_V1TitleChange = procedure(Sender: TObject; const Text: WideString) of object;
  913.   TWebBrowser_V1FrameBeforeNavigate = procedure(Sender: TObject; const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Cancel: WordBool) of object;
  914.   TWebBrowser_V1FrameNavigateComplete = procedure(Sender: TObject; const URL: WideString) of object;
  915.   TWebBrowser_V1FrameNewWindow = procedure(Sender: TObject; const URL: WideString; Flags: Integer; const TargetFrameName: WideString; var PostData: OleVariant; const Headers: WideString; var Processed: WordBool) of object;
  916.   TWebBrowser_V1Quit = procedure(Sender: TObject; var Cancel: WordBool) of object;
  917.   TWebBrowser_V1PropertyChange = procedure(Sender: TObject; const Property_: WideString) of object;
  918.  
  919.   TWebBrowser_V1 = class(TOleControl)
  920.   private
  921.     FOnBeforeNavigate: TWebBrowser_V1BeforeNavigate;
  922.     FOnNavigateComplete: TWebBrowser_V1NavigateComplete;
  923.     FOnStatusTextChange: TWebBrowser_V1StatusTextChange;
  924.     FOnProgressChange: TWebBrowser_V1ProgressChange;
  925.     FOnDownloadComplete: TNotifyEvent;
  926.     FOnCommandStateChange: TWebBrowser_V1CommandStateChange;
  927.     FOnDownloadBegin: TNotifyEvent;
  928.     FOnNewWindow: TWebBrowser_V1NewWindow;
  929.     FOnTitleChange: TWebBrowser_V1TitleChange;
  930.     FOnFrameBeforeNavigate: TWebBrowser_V1FrameBeforeNavigate;
  931.     FOnFrameNavigateComplete: TWebBrowser_V1FrameNavigateComplete;
  932.     FOnFrameNewWindow: TWebBrowser_V1FrameNewWindow;
  933.     FOnQuit: TWebBrowser_V1Quit;
  934.     FOnWindowMove: TNotifyEvent;
  935.     FOnWindowResize: TNotifyEvent;
  936.     FOnWindowActivate: TNotifyEvent;
  937.     FOnPropertyChange: TWebBrowser_V1PropertyChange;
  938.     FIntf: IWebBrowser;
  939.     function GetControlInterface: IWebBrowser;
  940.   protected
  941.     procedure CreateControl;
  942.     procedure InitControlData; override;
  943.     function GetTOleEnumProp(Index: Integer): TOleEnum;
  944.     procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
  945.   public
  946.     procedure GoBack;
  947.     procedure GoForward;
  948.     procedure GoHome;
  949.     procedure GoSearch;
  950.     procedure Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant);
  951.     procedure Refresh;
  952.     procedure Refresh2(var Level: OleVariant);
  953.     procedure Stop;
  954.     property ControlInterface: IWebBrowser read GetControlInterface;
  955.     property Application: IDispatch index 200 read GetIDispatchProp;
  956.     property Parent: IDispatch index 201 read GetIDispatchProp;
  957.     property Container: IDispatch index 202 read GetIDispatchProp;
  958.     property Document: IDispatch index 203 read GetIDispatchProp;
  959.     property TopLevelContainer: WordBool index 204 read GetWordBoolProp;
  960.     property Type_: WideString index 205 read GetWideStringProp;
  961.     property LocationName: WideString index 210 read GetWideStringProp;
  962.     property LocationURL: WideString index 211 read GetWideStringProp;
  963.     property Busy: WordBool index 212 read GetWordBoolProp;
  964.   published
  965.     property TabStop;
  966.     property Align;
  967.     property DragCursor;
  968.     property DragMode;
  969.     property ParentShowHint;
  970.     property PopupMenu;
  971.     property ShowHint;
  972.     property TabOrder;
  973.     property Visible;
  974.     property OnDragDrop;
  975.     property OnDragOver;
  976.     property OnEndDrag;
  977.     property OnEnter;
  978.     property OnExit;
  979.     property OnStartDrag;
  980.     property OnBeforeNavigate: TWebBrowser_V1BeforeNavigate read FOnBeforeNavigate write FOnBeforeNavigate;
  981.     property OnNavigateComplete: TWebBrowser_V1NavigateComplete read FOnNavigateComplete write FOnNavigateComplete;
  982.     property OnStatusTextChange: TWebBrowser_V1StatusTextChange read FOnStatusTextChange write FOnStatusTextChange;
  983.     property OnProgressChange: TWebBrowser_V1ProgressChange read FOnProgressChange write FOnProgressChange;
  984.     property OnDownloadComplete: TNotifyEvent read FOnDownloadComplete write FOnDownloadComplete;
  985.     property OnCommandStateChange: TWebBrowser_V1CommandStateChange read FOnCommandStateChange write FOnCommandStateChange;
  986.     property OnDownloadBegin: TNotifyEvent read FOnDownloadBegin write FOnDownloadBegin;
  987.     property OnNewWindow: TWebBrowser_V1NewWindow read FOnNewWindow write FOnNewWindow;
  988.     property OnTitleChange: TWebBrowser_V1TitleChange read FOnTitleChange write FOnTitleChange;
  989.     property OnFrameBeforeNavigate: TWebBrowser_V1FrameBeforeNavigate read FOnFrameBeforeNavigate write FOnFrameBeforeNavigate;
  990.     property OnFrameNavigateComplete: TWebBrowser_V1FrameNavigateComplete read FOnFrameNavigateComplete write FOnFrameNavigateComplete;
  991.     property OnFrameNewWindow: TWebBrowser_V1FrameNewWindow read FOnFrameNewWindow write FOnFrameNewWindow;
  992.     property OnQuit: TWebBrowser_V1Quit read FOnQuit write FOnQuit;
  993.     property OnWindowMove: TNotifyEvent read FOnWindowMove write FOnWindowMove;
  994.     property OnWindowResize: TNotifyEvent read FOnWindowResize write FOnWindowResize;
  995.     property OnWindowActivate: TNotifyEvent read FOnWindowActivate write FOnWindowActivate;
  996.     property OnPropertyChange: TWebBrowser_V1PropertyChange read FOnPropertyChange write FOnPropertyChange;
  997.   end;
  998.  
  999. { WebBrowser Control }
  1000.  
  1001.   TWebBrowserStatusTextChange = procedure(Sender: TObject; const Text: WideString) of object;
  1002.   TWebBrowserProgressChange = procedure(Sender: TObject; Progress, ProgressMax: Integer) of object;
  1003.   TWebBrowserCommandStateChange = procedure(Sender: TObject; Command: Integer; Enable: WordBool) of object;
  1004.   TWebBrowserTitleChange = procedure(Sender: TObject; const Text: WideString) of object;
  1005.   TWebBrowserPropertyChange = procedure(Sender: TObject; const szProperty: WideString) of object;
  1006.   TWebBrowserBeforeNavigate2 = procedure(Sender: TObject; pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData, Headers: OleVariant; var Cancel: WordBool) of object;
  1007.   TWebBrowserNewWindow2 = procedure(Sender: TObject; var ppDisp: IDispatch; var Cancel: WordBool) of object;
  1008.   TWebBrowserNavigateComplete2 = procedure(Sender: TObject; pDisp: IDispatch; var URL: OleVariant) of object;
  1009.   TWebBrowserDocumentComplete = procedure(Sender: TObject; pDisp: IDispatch; var URL: OleVariant) of object;
  1010.   TWebBrowserOnVisible = procedure(Sender: TObject; Visible: WordBool) of object;
  1011.   TWebBrowserOnToolBar = procedure(Sender: TObject; ToolBar: WordBool) of object;
  1012.   TWebBrowserOnMenuBar = procedure(Sender: TObject; MenuBar: WordBool) of object;
  1013.   TWebBrowserOnStatusBar = procedure(Sender: TObject; StatusBar: WordBool) of object;
  1014.   TWebBrowserOnFullScreen = procedure(Sender: TObject; FullScreen: WordBool) of object;
  1015.   TWebBrowserOnTheaterMode = procedure(Sender: TObject; TheaterMode: WordBool) of object;
  1016.  
  1017.   TWebBrowser = class(TOleControl)
  1018.   private
  1019.     FOnStatusTextChange: TWebBrowserStatusTextChange;
  1020.     FOnProgressChange: TWebBrowserProgressChange;
  1021.     FOnCommandStateChange: TWebBrowserCommandStateChange;
  1022.     FOnDownloadBegin: TNotifyEvent;
  1023.     FOnDownloadComplete: TNotifyEvent;
  1024.     FOnTitleChange: TWebBrowserTitleChange;
  1025.     FOnPropertyChange: TWebBrowserPropertyChange;
  1026.     FOnBeforeNavigate2: TWebBrowserBeforeNavigate2;
  1027.     FOnNewWindow2: TWebBrowserNewWindow2;
  1028.     FOnNavigateComplete2: TWebBrowserNavigateComplete2;
  1029.     FOnDocumentComplete: TWebBrowserDocumentComplete;
  1030.     FOnQuit: TNotifyEvent;
  1031.     FOnVisible: TWebBrowserOnVisible;
  1032.     FOnToolBar: TWebBrowserOnToolBar;
  1033.     FOnMenuBar: TWebBrowserOnMenuBar;
  1034.     FOnStatusBar: TWebBrowserOnStatusBar;
  1035.     FOnFullScreen: TWebBrowserOnFullScreen;
  1036.     FOnTheaterMode: TWebBrowserOnTheaterMode;
  1037.     FIntf: IWebBrowser2;
  1038.     function GetControlInterface: IWebBrowser2;
  1039.   protected
  1040.     procedure CreateControl;
  1041.     procedure InitControlData; override;
  1042.     function GetTOleEnumProp(Index: Integer): TOleEnum;
  1043.     procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
  1044.   public
  1045.     procedure GoBack;
  1046.     procedure GoForward;
  1047.     procedure GoHome;
  1048.     procedure GoSearch;
  1049.     procedure Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant);
  1050.     procedure Refresh;
  1051.     procedure Refresh2(var Level: OleVariant);
  1052.     procedure Stop;
  1053.     procedure Quit;
  1054.     procedure ClientToWindow(var pcx, pcy: SYSINT);
  1055.     procedure PutProperty(const Property_: WideString; vtValue: OleVariant);
  1056.     function GetProperty(const Property_: WideString): OleVariant;
  1057.     procedure Navigate2(var URL, Flags, TargetFrameName, PostData, Headers: OleVariant);
  1058.     function QueryStatusWB(cmdID: OLECMDID): OLECMDF;
  1059.     procedure ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn, pvaOut: OleVariant);
  1060.     procedure ShowBrowserBar(var pvaClsid, pvarShow, pvarSize: OleVariant);
  1061.     property ControlInterface: IWebBrowser2 read GetControlInterface;
  1062.     property Application: IDispatch index 200 read GetIDispatchProp;
  1063.     property Parent: IDispatch index 201 read GetIDispatchProp;
  1064.     property Container: IDispatch index 202 read GetIDispatchProp;
  1065.     property Document: IDispatch index 203 read GetIDispatchProp;
  1066.     property TopLevelContainer: WordBool index 204 read GetWordBoolProp;
  1067.     property Type_: WideString index 205 read GetWideStringProp;
  1068.     property LocationName: WideString index 210 read GetWideStringProp;
  1069.     property LocationURL: WideString index 211 read GetWideStringProp;
  1070.     property Busy: WordBool index 212 read GetWordBoolProp;
  1071.     property Name: WideString index 0 read GetWideStringProp;
  1072.     property HWND: Integer index -515 read GetIntegerProp;
  1073.     property FullName: WideString index 400 read GetWideStringProp;
  1074.     property Path: WideString index 401 read GetWideStringProp;
  1075.     property ReadyState: tagREADYSTATE index -525 read GetTOleEnumProp;
  1076.   published
  1077.     property TabStop;
  1078.     property Align;
  1079.     property DragCursor;
  1080.     property DragMode;
  1081.     property ParentShowHint;
  1082.     property PopupMenu;
  1083.     property ShowHint;
  1084.     property TabOrder;
  1085.     property OnDragDrop;
  1086.     property OnDragOver;
  1087.     property OnEndDrag;
  1088.     property OnEnter;
  1089.     property OnExit;
  1090.     property OnStartDrag;
  1091.     property Visible: WordBool index 402 read GetWordBoolProp write SetWordBoolProp stored False;
  1092.     property StatusBar: WordBool index 403 read GetWordBoolProp write SetWordBoolProp stored False;
  1093.     property StatusText: WideString index 404 read GetWideStringProp write SetWideStringProp stored False;
  1094.     property ToolBar: SYSINT index 405 read GetIntegerProp write SetIntegerProp stored False;
  1095.     property MenuBar: WordBool index 406 read GetWordBoolProp write SetWordBoolProp stored False;
  1096.     property FullScreen: WordBool index 407 read GetWordBoolProp write SetWordBoolProp stored False;
  1097.     property Offline: WordBool index 550 read GetWordBoolProp write SetWordBoolProp stored False;
  1098.     property Silent: WordBool index 551 read GetWordBoolProp write SetWordBoolProp stored False;
  1099.     property RegisterAsBrowser: WordBool index 552 read GetWordBoolProp write SetWordBoolProp stored False;
  1100.     property RegisterAsDropTarget: WordBool index 553 read GetWordBoolProp write SetWordBoolProp stored False;
  1101.     property TheaterMode: WordBool index 554 read GetWordBoolProp write SetWordBoolProp stored False;
  1102.     property AddressBar: WordBool index 555 read GetWordBoolProp write SetWordBoolProp stored False;
  1103.     property Resizable: WordBool index 556 read GetWordBoolProp write SetWordBoolProp stored False;
  1104.     property OnStatusTextChange: TWebBrowserStatusTextChange read FOnStatusTextChange write FOnStatusTextChange;
  1105.     property OnProgressChange: TWebBrowserProgressChange read FOnProgressChange write FOnProgressChange;
  1106.     property OnCommandStateChange: TWebBrowserCommandStateChange read FOnCommandStateChange write FOnCommandStateChange;
  1107.     property OnDownloadBegin: TNotifyEvent read FOnDownloadBegin write FOnDownloadBegin;
  1108.     property OnDownloadComplete: TNotifyEvent read FOnDownloadComplete write FOnDownloadComplete;
  1109.     property OnTitleChange: TWebBrowserTitleChange read FOnTitleChange write FOnTitleChange;
  1110.     property OnPropertyChange: TWebBrowserPropertyChange read FOnPropertyChange write FOnPropertyChange;
  1111.     property OnBeforeNavigate2: TWebBrowserBeforeNavigate2 read FOnBeforeNavigate2 write FOnBeforeNavigate2;
  1112.     property OnNewWindow2: TWebBrowserNewWindow2 read FOnNewWindow2 write FOnNewWindow2;
  1113.     property OnNavigateComplete2: TWebBrowserNavigateComplete2 read FOnNavigateComplete2 write FOnNavigateComplete2;
  1114.     property OnDocumentComplete: TWebBrowserDocumentComplete read FOnDocumentComplete write FOnDocumentComplete;
  1115.     property OnQuit: TNotifyEvent read FOnQuit write FOnQuit;
  1116.     property OnVisible: TWebBrowserOnVisible read FOnVisible write FOnVisible;
  1117.     property OnToolBar: TWebBrowserOnToolBar read FOnToolBar write FOnToolBar;
  1118.     property OnMenuBar: TWebBrowserOnMenuBar read FOnMenuBar write FOnMenuBar;
  1119.     property OnStatusBar: TWebBrowserOnStatusBar read FOnStatusBar write FOnStatusBar;
  1120.     property OnFullScreen: TWebBrowserOnFullScreen read FOnFullScreen write FOnFullScreen;
  1121.     property OnTheaterMode: TWebBrowserOnTheaterMode read FOnTheaterMode write FOnTheaterMode;
  1122.   end;
  1123.  
  1124. { Shell Folder View Events Router. }
  1125.  
  1126.   TShellFolderViewOC = class(TOleControl)
  1127.   private
  1128.     FOnSelectionChanged: TNotifyEvent;
  1129.     FIntf: IFolderViewOC;
  1130.     function GetControlInterface: IFolderViewOC;
  1131.   protected
  1132.     procedure CreateControl;
  1133.     procedure InitControlData; override;
  1134.     function GetTOleEnumProp(Index: Integer): TOleEnum;
  1135.     procedure SetTOleEnumProp(Index: Integer; Value: TOleEnum);
  1136.   public
  1137.     procedure SetFolderView(pDisp: IDispatch);
  1138.     property ControlInterface: IFolderViewOC read GetControlInterface;
  1139.   published
  1140.     property OnSelectionChanged: TNotifyEvent read FOnSelectionChanged write FOnSelectionChanged;
  1141.   end;
  1142.  
  1143. procedure Register;
  1144.  
  1145. implementation
  1146.  
  1147. uses ComObj;
  1148.  
  1149. procedure TWebBrowser_V1.InitControlData;
  1150. const
  1151.   CEventDispIDs: array[0..16] of Integer = (
  1152.     $00000064, $00000065, $00000066, $0000006C, $00000068, $00000069,
  1153.     $0000006A, $0000006B, $00000071, $000000C8, $000000C9, $000000CC,
  1154.     $00000067, $0000006D, $0000006E, $0000006F, $00000070);
  1155.   CControlData: TControlData = (
  1156.     ClassID: '{EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B}';
  1157.     EventIID: '{EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B}';
  1158.     EventCount: 17;
  1159.     EventDispIDs: @CEventDispIDs;
  1160.     LicenseKey: nil;
  1161.     Flags: $00000000;
  1162.     Version: 300);
  1163. begin
  1164.   ControlData := @CControlData;
  1165. end;
  1166.  
  1167. procedure TWebBrowser_V1.CreateControl;
  1168.  
  1169.   procedure DoCreate;
  1170.   begin
  1171.     FIntf := IUnknown(OleObject) as IWebBrowser;
  1172.   end;
  1173.  
  1174. begin
  1175.   if FIntf = nil then DoCreate;
  1176. end;
  1177.  
  1178. function TWebBrowser_V1.GetControlInterface: IWebBrowser;
  1179. begin
  1180.   CreateControl;
  1181.   Result := FIntf;
  1182. end;
  1183.  
  1184. function TWebBrowser_V1.GetTOleEnumProp(Index: Integer): TOleEnum;
  1185. begin
  1186.   Result := GetIntegerProp(Index);
  1187. end;
  1188.  
  1189. procedure TWebBrowser_V1.SetTOleEnumProp(Index: Integer; Value: TOleEnum);
  1190. begin
  1191.   SetIntegerProp(Index, Value);
  1192. end;
  1193.  
  1194. procedure TWebBrowser_V1.GoBack;
  1195. begin
  1196.   CreateControl;
  1197.   FIntf.GoBack;
  1198. end;
  1199.  
  1200. procedure TWebBrowser_V1.GoForward;
  1201. begin
  1202.   CreateControl;
  1203.   FIntf.GoForward;
  1204. end;
  1205.  
  1206. procedure TWebBrowser_V1.GoHome;
  1207. begin
  1208.   CreateControl;
  1209.   FIntf.GoHome;
  1210. end;
  1211.  
  1212. procedure TWebBrowser_V1.GoSearch;
  1213. begin
  1214.   CreateControl;
  1215.   FIntf.GoSearch;
  1216. end;
  1217.  
  1218. procedure TWebBrowser_V1.Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant);
  1219. begin
  1220.   CreateControl;
  1221.   FIntf.Navigate(URL, Flags, TargetFrameName, PostData, Headers);
  1222. end;
  1223.  
  1224. procedure TWebBrowser_V1.Refresh;
  1225. begin
  1226.   CreateControl;
  1227.   FIntf.Refresh;
  1228. end;
  1229.  
  1230. procedure TWebBrowser_V1.Refresh2(var Level: OleVariant);
  1231. begin
  1232.   CreateControl;
  1233.   FIntf.Refresh2(Level);
  1234. end;
  1235.  
  1236. procedure TWebBrowser_V1.Stop;
  1237. begin
  1238.   CreateControl;
  1239.   FIntf.Stop;
  1240. end;
  1241.  
  1242.  
  1243. procedure TWebBrowser.InitControlData;
  1244. const
  1245.   CEventDispIDs: array[0..17] of Integer = (
  1246.     $00000066, $0000006C, $00000069, $0000006A, $00000068, $00000071,
  1247.     $00000070, $000000FA, $000000FB, $000000FC, $00000103, $000000FD,
  1248.     $000000FE, $000000FF, $00000100, $00000101, $00000102, $00000104);
  1249.   CControlData: TControlData = (
  1250.     ClassID: '{8856F961-340A-11D0-A96B-00C04FD705A2}';
  1251.     EventIID: '{34A715A0-6587-11D0-924A-0020AFC7AC4D}';
  1252.     EventCount: 18;
  1253.     EventDispIDs: @CEventDispIDs;
  1254.     LicenseKey: nil;
  1255.     Flags: $00000000;
  1256.     Version: 300);
  1257. begin
  1258.   ControlData := @CControlData;
  1259. end;
  1260.  
  1261. procedure TWebBrowser.CreateControl;
  1262.  
  1263.   procedure DoCreate;
  1264.   begin
  1265.     FIntf := IUnknown(OleObject) as IWebBrowser2;
  1266.   end;
  1267.  
  1268. begin
  1269.   if FIntf = nil then DoCreate;
  1270. end;
  1271.  
  1272. function TWebBrowser.GetControlInterface: IWebBrowser2;
  1273. begin
  1274.   CreateControl;
  1275.   Result := FIntf;
  1276. end;
  1277.  
  1278. function TWebBrowser.GetTOleEnumProp(Index: Integer): TOleEnum;
  1279. begin
  1280.   Result := GetIntegerProp(Index);
  1281. end;
  1282.  
  1283. procedure TWebBrowser.SetTOleEnumProp(Index: Integer; Value: TOleEnum);
  1284. begin
  1285.   SetIntegerProp(Index, Value);
  1286. end;
  1287.  
  1288. procedure TWebBrowser.GoBack;
  1289. begin
  1290.   CreateControl;
  1291.   FIntf.GoBack;
  1292. end;
  1293.  
  1294. procedure TWebBrowser.GoForward;
  1295. begin
  1296.   CreateControl;
  1297.   FIntf.GoForward;
  1298. end;
  1299.  
  1300. procedure TWebBrowser.GoHome;
  1301. begin
  1302.   CreateControl;
  1303.   FIntf.GoHome;
  1304. end;
  1305.  
  1306. procedure TWebBrowser.GoSearch;
  1307. begin
  1308.   CreateControl;
  1309.   FIntf.GoSearch;
  1310. end;
  1311.  
  1312. procedure TWebBrowser.Navigate(const URL: WideString; var Flags, TargetFrameName, PostData, Headers: OleVariant);
  1313. begin
  1314.   CreateControl;
  1315.   FIntf.Navigate(URL, Flags, TargetFrameName, PostData, Headers);
  1316. end;
  1317.  
  1318. procedure TWebBrowser.Refresh;
  1319. begin
  1320.   CreateControl;
  1321.   FIntf.Refresh;
  1322. end;
  1323.  
  1324. procedure TWebBrowser.Refresh2(var Level: OleVariant);
  1325. begin
  1326.   CreateControl;
  1327.   FIntf.Refresh2(Level);
  1328. end;
  1329.  
  1330. procedure TWebBrowser.Stop;
  1331. begin
  1332.   CreateControl;
  1333.   FIntf.Stop;
  1334. end;
  1335.  
  1336. procedure TWebBrowser.Quit;
  1337. begin
  1338.   CreateControl;
  1339.   FIntf.Quit;
  1340. end;
  1341.  
  1342. procedure TWebBrowser.ClientToWindow(var pcx, pcy: SYSINT);
  1343. begin
  1344.   CreateControl;
  1345.   FIntf.ClientToWindow(pcx, pcy);
  1346. end;
  1347.  
  1348. procedure TWebBrowser.PutProperty(const Property_: WideString; vtValue: OleVariant);
  1349. begin
  1350.   CreateControl;
  1351.   FIntf.PutProperty(Property_, vtValue);
  1352. end;
  1353.  
  1354. function TWebBrowser.GetProperty(const Property_: WideString): OleVariant;
  1355. begin
  1356.   CreateControl;
  1357.   Result := FIntf.GetProperty(Property_);
  1358. end;
  1359.  
  1360. procedure TWebBrowser.Navigate2(var URL, Flags, TargetFrameName, PostData, Headers: OleVariant);
  1361. begin
  1362.   CreateControl;
  1363.   FIntf.Navigate2(URL, Flags, TargetFrameName, PostData, Headers);
  1364. end;
  1365.  
  1366. function TWebBrowser.QueryStatusWB(cmdID: OLECMDID): OLECMDF;
  1367. begin
  1368.   CreateControl;
  1369.   Result := FIntf.QueryStatusWB(cmdID);
  1370. end;
  1371.  
  1372. procedure TWebBrowser.ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn, pvaOut: OleVariant);
  1373. begin
  1374.   CreateControl;
  1375.   FIntf.ExecWB(cmdID, cmdexecopt, pvaIn, pvaOut);
  1376. end;
  1377.  
  1378. procedure TWebBrowser.ShowBrowserBar(var pvaClsid, pvarShow, pvarSize: OleVariant);
  1379. begin
  1380.   CreateControl;
  1381.   FIntf.ShowBrowserBar(pvaClsid, pvarShow, pvarSize);
  1382. end;
  1383.  
  1384.  
  1385. procedure TShellFolderViewOC.InitControlData;
  1386. const
  1387.   CEventDispIDs: array[0..0] of Integer = (
  1388.     $000000C8);
  1389.   CControlData: TControlData = (
  1390.     ClassID: '{9BA05971-F6A8-11CF-A442-00A0C90A8F39}';
  1391.     EventIID: '{62112AA2-EBE4-11CF-A5FB-0020AFE7292D}';
  1392.     EventCount: 1;
  1393.     EventDispIDs: @CEventDispIDs;
  1394.     LicenseKey: nil;
  1395.     Flags: $00000000;
  1396.     Version: 300);
  1397. begin
  1398.   ControlData := @CControlData;
  1399. end;
  1400.  
  1401. procedure TShellFolderViewOC.CreateControl;
  1402.  
  1403.   procedure DoCreate;
  1404.   begin
  1405.     FIntf := IUnknown(OleObject) as IFolderViewOC;
  1406.   end;
  1407.  
  1408. begin
  1409.   if FIntf = nil then DoCreate;
  1410. end;
  1411.  
  1412. function TShellFolderViewOC.GetControlInterface: IFolderViewOC;
  1413. begin
  1414.   CreateControl;
  1415.   Result := FIntf;
  1416. end;
  1417.  
  1418. function TShellFolderViewOC.GetTOleEnumProp(Index: Integer): TOleEnum;
  1419. begin
  1420.   Result := GetIntegerProp(Index);
  1421. end;
  1422.  
  1423. procedure TShellFolderViewOC.SetTOleEnumProp(Index: Integer; Value: TOleEnum);
  1424. begin
  1425.   SetIntegerProp(Index, Value);
  1426. end;
  1427.  
  1428. procedure TShellFolderViewOC.SetFolderView(pDisp: IDispatch);
  1429. begin
  1430.   CreateControl;
  1431.   FIntf.SetFolderView(pDisp);
  1432. end;
  1433.  
  1434.  
  1435. procedure Register;
  1436. begin
  1437.   RegisterComponents('ActiveX', [TWebBrowser_V1, TWebBrowser, TShellFolderViewOC]);
  1438. end;
  1439.  
  1440. end.
  1441.